package com.example.yunpicturebackend.exception;

import lombok.Getter;

/**
 * @author Yan.z.h
 * @version 1.0
 */

/**
 * 错误代码
 */
@Getter
public enum ErrorCode {
    SUCCESS(0,"ok"),
    PARAMS_ERROR(40000,"请求参数错误"),
    NULL_ERROR(40400,"请求数据为空"),
    NOT_LOGIN(40100,"未登录"),
    NO_AUTH(40101,"无权限"),
    FORBIDDEN_ERROR(40300,"禁止访问"),
    OPERATION_ERROR(50001,"操作失败"),
    SYSTEM_ERROR(50000,"系统内部异常");

    private final   int code;
    private final String messages;

    ErrorCode(int code, String messages) {
        this.code = code;
        this.messages = messages;
    }
}
